package data_structure;

import java.net.Socket;

public class Address {
	private String 	ip;
	private int		port;
	private Socket  socket;
	
	public Address(String ip,int port)
	{
		this.ip = ip;
		this.port = port;
	}
	
	public Address(String ip,int port, Socket socket)
	{
		this.ip = ip;
		this.port = port;
		this.socket=socket;
	}
	
	public String getIp()
	{
		return this.ip;
	}
	
	public int getPort()
	{
		return this.port;
	}
	
	public Socket getSocket()
	{
		return this.socket;
	}
	
	public String getPeerAddress()
	{
		return this.ip + " " + this.getPort();
	}
	
	public void setPort(int port)
	{
		this.port=port;
	}
	
	public void setIP(String ip)
	{
		this.ip=ip;
	}
	
	public void setSocket(Socket socket)
	{
		this.socket=socket;
	}
}
